package domain.exceptions;

public class DuplicateException extends Exception{
	private static final long serialVersionUID = 1L;

	public enum DupErrorCode {DUP_DOC_NUMBER("dupDocNbr"), DUP_EMAIL("dupEmail");
	
		private final String msgCode; 
		DupErrorCode(String msgCode) { this.msgCode = msgCode; }
		public String toString() { return this.msgCode; }
	};
	
	private DupErrorCode errorCode;
	
	public DuplicateException(){
		super();
	}
	
	public DuplicateException(DupErrorCode errorCode){
		super();
		this.errorCode = errorCode;
	}
	
	public DupErrorCode getErrorCode() {
		return this.errorCode;
	}
}
